#include <bits/stdc++.h>
// 2025/01/20
// tag: 
// Author: Zhang Muen
using namespace std;

int n, team[100001], ability[100001], s[100001], teamcnt = 0;

signed main()
{
    cin >> n;
    for (int i = 1; i <= n; i++)
        cin >> ability[i];
    sort(ability+1, ability+n+1);
    for (int i = 1; i <= n; i++){
        int p = upper_bound(team+1, team+teamcnt+1, ability[i]) - team - 1;
        if (team[p] != ability[i]){
            team[++teamcnt] = ability[i] + 1;
            s[teamcnt] = 1;
        }
        else{
            team[p] = ability[i] + 1;
            s[p]++;
        }
    }
    int ans = INT_MAX;
    for (int i = 1; i <= teamcnt; i++)
        ans = min(ans, s[i]);
    cout << ans << endl;
    return 0;
}